package com.bowlong.net;

import java.util.Map;

import com.bowlong.util.NewMap;

@SuppressWarnings("rawtypes")
public interface TcpChannel {

	// public void writeTo(int pid, int cmd, Map map) throws Exception;

	// public T attachment();
	//
	// public void setAttachment(T attach);

	public void close();

	public int send(Map map) throws Exception;

	public int send(byte[] buf) throws Exception;

	public int readInt() throws Exception;

	public byte[] readBytes(int len) throws Exception;

	public NewMap readMap() throws Exception;

}
